#include <iostream>
using namespace std;

class CDate {
private:
    int year;
    int month;
    int day;

public:
    CDate();
    CDate(int year, int month, int day);
    void ShowDate();
    void SetDate(int year, int month, int day);
};

int main() {
    CDate myDate;
    CDate yourDate(1955, 5, 5);

    cout << "\n原日期为:\n";

    cout << "myDate的日期是: ";
    myDate.ShowDate();

    cout << "yourDate的日期是: ";
    yourDate.ShowDate();

    cout << "\n现在修改日期。\n";
    myDate.SetDate(1956, 1, 2);
    yourDate.SetDate(1994, 3, 14);

    cout << "\n新日期是:\n";

    cout << "myDate的日期是: ";
    myDate.ShowDate();

    cout << "yourDate的日期是: ";
    yourDate.ShowDate();

    cout << "完毕\n";
}

CDate::CDate() {
    cout << "默认构造函数\n";
    SetDate(2001, 1, 1);
}

CDate::CDate(int year, int month, int day) {
    cout << "有参数的构造函数\n";
    SetDate(year, month, day);
}

void CDate::SetDate(int year, int month, int day) {
    this->year = year;
    this->month = month;
    this->day = day;
}

void CDate::ShowDate() {
    cout << year << "/" << month << "/" << day << "\n";
}
